%using Babel;
%using Babel.Parser;
%using Babel.ParserGenerator;
%using StateMachine.Runtime.Compiler.Parser;
%namespace StateMachine.Runtime.Compiler.Lexer

%{
	internal void LoadTokenInfo()
	{
		yylval.States = new List<StateNode>();
		yylval.Value = yytext;
		yylloc = new LexLocation( tokLin, tokCol, tokLin, tokCol + tokLen );
	}

%}

WhiteSpace		[ \t\r\f\v]

%%
{WhiteSpace}+      { tokenCode = (int)Tokens.WHITE_SPACE; }

[a-zA-Z0-9_]*      { tokenCode = (int)Tokens.IDENTIFIER; }
\=                 { tokenCode = (int)Tokens.EQUAL; }
\,                 { tokenCode = (int)Tokens.COMMA; }
\(                 { tokenCode = (int)Tokens.OPEN_PAREN; }
\)                 { tokenCode = (int)Tokens.CLOSE_PAREN; }
\{                 { tokenCode = (int)Tokens.OPEN_SET; }
\}                 { tokenCode = (int)Tokens.CLOSE_SET; }
\".\"              { tokenCode = (int)Tokens.SYMBOL_KW; }


%{
		this.LoadTokenInfo();
%}


%%

/* ... */